<?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006~2018 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------
use think\facade\Request;
use think\facade\Route;
use think\facade\Session;

Route::get('think', function () {
    return 'hello,ThinkPHP6!';
});

Route::get('hello', 'Index/index');

Route::group('api',function(){
    //获取投票设置信息
    //Route::get('gettp','Index/gettp')->middleware('uTokenchecke');
    Route::get('gettp','Index/gettp');
    
    //增加点击量
    Route::get('tpcat','Index/tpcat');
    //候选增加点击量
    Route::get('hxcat','Index/hxcat');
    
    //获取候选信息一
    Route::get('gettpoptiony','Index/gettpoptiony');
    //前台获取候选信息一详情
    Route::get('gettpoptionycontent','Index/gettpoptionycontent');
    
    //前台获取候选信息二详情
    Route::get('gettpoptione','Index/gettpoptione');
    //前台获取候选信息二详情加
    Route::get('gettpoptionejia','Index/gettpoptionejia');
    //前台获取候选信息二详情搜
    Route::get('gettpoptionesou','Index/gettpoptionesou');

    //前台获取搜
    Route::get('gettpsou','Index/gettpsou');

    //前台获取候选信息详情
    Route::get('gettpoption','Index/gettpoption');
    //前台获取候选信息排行
    Route::get('gettpoptionranking','Index/gettpoptionranking');
    
    //单选投票
    Route::post('danxtp','Index/danxtp')->middleware('SignCheck')->middleware('uTokenchecktwo');
    //多选投票
    // Route::post('duoxtp','Index/duoxtp')->middleware('Bdtkchenck')->middleware('uTokencheck');
    Route::post('duoxtp','Index/duoxtp')->middleware('SignCheck')->middleware('uTokenchecktwo');
    
    //上传图片
    Route::post('uploadqtimg','Index/uploadqtimg');
    //上传视频
    Route::post('uploadqtvideo','Index/uploadqtvideo');
    //上传音频
    Route::post('uploadqtaudio','Index/uploadqtaudio');
    //删除文件
    Route::get('uploadqtimgdel','Index/uploadqtimgdel');

    //记录用户信息
    // Route::get('userinfo','Index/userinfo')->middleware('uTokenchecke');
    Route::get('userinfo','Index/userinfo')->middleware('uTokenchecktwoe');

    //报名获取
    Route::get('baoming','Index/baoming')->middleware('uTokenchecktwo');
    //记录报名
    Route::post('updatabaoming','Index/updatabaoming')->middleware('SignCheck')->middleware('uTokenchecktwo');
    //属性获取
    Route::get('shuxing','Index/shuxing')->middleware('uTokenchecktwo');
    //记录属性
    Route::post('updatashuxing','Index/updatashuxing')->middleware('SignCheck')->middleware('uTokenchecktwo');

    //获取表单token
    Route::get('getbdtk','Index/getbdtk');

    //验证uToken
    Route::get('uToken','Index/uToken')->middleware('uTokenchecktwo');

    //是否关注
    Route::get('ywgz','Index/ywgz');

})->middleware('CrossDomain');
